#!/bin/bash

##登录Harbor
docker login -u admin -p 123 192.168.51.104:8888


## web-example
tag=192.168.51.104:8888/repo/example-web-example


npm install
npm run build

docker build -t $tag:latest .

if test "$1" != ""; then
  docker push $tag:latest
  docker tag $tag:latest $tag:$1
  docker push $tag:$1
fi


